
import {createBrowserRouter} from "react-router-dom";
import Equipment from "../views/Home/Equipment/index.jsx";
import Material from "../views/Home/Material/index.jsx";
import MainPage from '@/views/MainPage/Index.jsx'
import EquipmentOne from '@/views/Home/EquipmentOne/Index.jsx'

const router=createBrowserRouter([
    {
        path:'/equipment',
        element:<Equipment/>
    },
    {
        path:'/material',
        element:<Material/>
    },
    {
        path:'/',
        element:<MainPage/>,
        children:[
            {
                // 路由传参
                // 这里是传两个参数，每一个参数前面有一个:号，多个参数之间用/分割
                // 注意，这里参数的id，name,要与其他组件调用这两个参数时的params.id，params.name名字对应
                path:`/equipmentOne/:id/:name`,
                element:<EquipmentOne/>
            },
        ]
    },



])
export default router